<%@page import="com.hhit.collaborative_learning.utils.Utils"%>
<%@page import="com.hhit.collaborative_learning.entity.BlogExpert"%>
<%@page import="com.hhit.collaborative_learning.dao.impl.PublicDaoImplMySql"%>
<%@page import="com.hhit.collaborative_learning.entity.User"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ page isELIgnored="false"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	String userId=Utils.getCookieValue("userId", request);
	PublicDaoImplMySql dao=new PublicDaoImplMySql();
	BlogExpert expert=dao.getExpertApplyResult(Integer.parseInt(userId));
	if(expert.conditionOne==0){
		request.setAttribute("one", "不符合");
	}else if(expert.conditionOne==2){
		request.setAttribute("one", "审核中");
	}else{
		request.setAttribute("one", "符合");
	}
	
	if(expert.conditionTwo==0){
		request.setAttribute("two", "不符合");
	}else if(expert.conditionTwo==2){
		request.setAttribute("two", "审核中");
	}else{
		request.setAttribute("two", "符合");
	}
	
	if(expert.conditionThree==0){
		request.setAttribute("three", "不符合");
	}else if(expert.conditionThree==2){
		request.setAttribute("three", "审核中");
	}else{
		request.setAttribute("three", "符合");
	}
	
	if(expert.applyState==1){
		request.setAttribute("apply", 0);
	}
	
%>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<!-- <script id="allmobilize" charset="utf-8" -->
<!-- 	src="<%=basePath%>js/allmobilize.min.js"></script> -->

<!--new top-->
<link rel="stylesheet" href="<%=basePath%>css/index.css">
<!--new top-->

<link rel="Stylesheet" type="text/css" href="<%=basePath%>css/home.css" />
<script src="<%=basePath%>js/jquery.js" type="text/javascript"></script>
<script src="<%=basePath%>js/home.js" type="text/javascript"></script>
<script src="<%=basePath%>js/plugins.js" type="text/javascript"></script>
<script type="text/javascript">
	window.onbeforeunload=deleteResult;
	function deleteResult(){
		if(<%=expert.applyState%>==2){
			$.get("<%=basePath%>DeleteFailApplyServlet?userId=<%=userId%>",function(data,status){
		    });
		}
	}
</script>
</head>
<body>

	<div role="banner" class="blog-nav">
		<div class="container">
			<div role="navigation" class="navbar-collapse">
				<ul class="navbar-nav">
					<li class=active><a
						href="<%=basePath%>learning/learning.jsp" target="_top" title="">首页</a></li>
					<li><a href="<%=basePath%>learning/expert.jsp">博客专家</a></li>
					<li><a href="" class="rss"
						link="learning/myblog.jsp?page=bloglist"
						onclick="checkLogin(this)" target="_blank">我的专题</a></li>
					<li><a href="<%=basePath %>learning/search.jsp?type=1" target="_blank">搜索</a></li>
				</ul>
			</div>
		</div>
	</div>
	<div id="wrap">
		<div class="main_con">
			<style type="text/css">
th {
	text-align: right;
	color: #777;
}

input {
	width: 220px;
}

#btnsub {
	width: 80px;
}

.err {
	padding-left: 10px;
	color: Red;
}
</style>
			<!-- //nav -->
			<script src="<%=basePath%>js/csdn.check.js" type="text/javascript"></script>
			<div class="main_con">
				<div class="way_nav">
					<a href="<%=basePath%>learning/expert.jsp">博客专家</a><em>&gt;</em><a
						href="<%=basePath%>learning/main_apply_expert.jsp">博客专家申请规则</a><em>&gt;</em><a
						href="#">博客专家申请结果</a>
				</div>
				<div class="bor_box rule">
					<h2>博客专家申请结果</h2>
					<table border="1" cellspacing="0" cellpadding="0">
						<tr>
							<th
								style="text-align: left;PADDING-BOTTOM: 4px; PADDING-LEFT: 4px; PADDING-RIGHT: 4px; PADDING-TOP: 4px">1.原创IT类文章总数超过20篇，并且最近一个月内发布了新的原创IT类文章</th>
							<td>${requestScope.one}</td>
						</tr>
						<tr>
							<th
								style="text-align: left;PADDING-BOTTOM: 4px; PADDING-LEFT: 4px; PADDING-RIGHT: 4px; PADDING-TOP: 4px">2.博客文章总的浏览量超过5万次以上</th>
							<td>${requestScope.two}</td>
						</tr>
						<tr>
							<th
								style="text-align: left;PADDING-BOTTOM: 4px; PADDING-LEFT: 4px; PADDING-RIGHT: 4px; PADDING-TOP: 4px">3.文章内容的质量很高</th>
							<td>${requestScope.three}</td>
						</tr>
						<tr>
							<th colspan="2"
								style="text-align: left;PADDING-BOTTOM: 4px; PADDING-LEFT: 4px; PADDING-RIGHT: 4px; PADDING-TOP: 4px;color: red">注：若申请失败，当离开该界面后，此次申请结果将无法再次查看！</th>
						</tr>
						<tr>
							<td colspan="2" align="center"
								style="PADDING-BOTTOM: 4px; PADDING-LEFT: 4px; PADDING-RIGHT: 4px; PADDING-TOP: 4px"><input id="button"
								class="btn" type="submit" value="再次申请" <c:if test="${requestScope.apply eq 0}">disabled="disabled"</c:if> /> <span
								class="err" id="Sp_err"></span></td>
						</tr>
					</table>
				</div>
			</div>
			<script language="javascript" type="text/javascript">
				$(function () {
						        $("#button").click(function () {
						        location.href="<%=basePath%>learning/apply_expert_form.jsp";
						        });
						    });
			</script>

		</div>

<!-- 		<script type="text/javascript" src="<%=basePath%>js/cnick.js"></script> -->

	</div>
	<link href="<%=basePath%>css/ask_float_block.css" type="text/css"
		rel="stylesheet" />
	<script type='text/javascript'>
(function(){
$(function(){
	var back_top_value =Math.ceil(document.documentElement.clientHeight *0.65);
	var float_ask_img="<div data-mod='popu_64' class='tracking-ad' chg-blk='0' ><a id='com-d-top-a'  style='top:"+back_top_value+"px' title='返回顶部' onclick='' ></a> </div>";
	$("body").append(float_ask_img);
	
	var d_top = $('#com-d-top-a');

        $(document).scroll(function(){
            var scrTop = (document.body.scrollTop || document.documentElement.scrollTop);
            if (scrTop > 500)
            {
                d_top.show();
            } else
            {
                d_top.hide();
            }

        })
        $('#com-d-top-a').click(function ()
        {
            scrollTo(0, 0);
            this.blur();
            return false;
        });
});
})();
</script>

</body>
</html>
